package com.meijin.spring6.resource.controller;

import com.meijin.spring6.resource.service.TeacherService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * @Author meijindeng
 * @Data 2023-09-03 21:22
 * @Description TeacherController 控制层
 * @Version 1.0
 */
@Controller
public class TeacherController {

    //第一种：根据 name 注入
    @Resource
    private TeacherService teacherService;

    public void add() {
        System.out.println("controller add方法执行了。。。");
        teacherService.add();
    }
}
